<template>
	<div class="addCustomer">
		<el-divider content-position="left">
			<el-link type="primary">基本资料</el-link>
		</el-divider>
		<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm"
			:disabled="type=='查看'">
			<el-row>
				<el-col :span="8">
					<el-form-item name="供应商编号" :label="computeInputBox('supplierNo','label')"
						:prop="computeInputBox('supplierNo','isInput')" v-if="computeInputBox('supplierNo','show')">
						<el-input class="lz-el-input" v-model="ruleForm.supplierNo" :size="size" :maxlength="20"></el-input>
					</el-form-item>
					<el-form-item name="供应商类型" :label="computeInputBox('supplieType','label')"
						:prop="computeInputBox('supplieType','isInput')" v-if="computeInputBox('supplieType','show')">
						<el-select v-model="ruleForm.supplieType" placeholder="请选择" :size="size" clearable
							class="lz-el-select" :disabled="computeInputBox('supplieType','disabled')">
							<el-option v-for="item in supplieTypeList" :key="item.id" :label="item.businessName"
								:value="item.businessType"></el-option>
						</el-select>
					</el-form-item>
					<el-form-item name="供应商简称" :label="computeInputBox('supplierCname','label')"
						:prop="computeInputBox('supplierCname','isInput')"
						v-if="computeInputBox('supplierCname','show')">
						<el-input class="lz-el-input" v-model="ruleForm.supplierCname"
							:disabled="computeInputBox('supplierCname','disabled')" :size="size" :maxlength="50"></el-input>
					</el-form-item>
					<el-form-item name="供应商全称" :label="computeInputBox('supplierEname','label')"
						:prop="computeInputBox('supplierEname','isInput')"
						v-if="computeInputBox('supplierEname','show')">
						<el-input class="lz-el-input" v-model="ruleForm.supplierEname"
							:disabled="computeInputBox('supplierEname','disabled')" :size="size" :maxlength="50"></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="8">
					<el-form-item name="公司性质" :label="computeInputBox('companyKind','label')"
						:prop="computeInputBox('companyKind','isInput')" v-if="computeInputBox('companyKind','show')">
						<el-select v-model="ruleForm.companyKind" placeholder="请选择" :size="size" clearable
							class="lz-el-select" :disabled="computeInputBox('companyKind','disabled')">
							<el-option v-for="item in companykindList" :key="item.value" :label="item.label"
								:value="item.value"></el-option>
						</el-select>
					</el-form-item>
					<el-form-item name="经营范围" :label="computeInputBox('manageRange','label')"
						:prop="computeInputBox('manageRange','isInput')" v-if="computeInputBox('manageRange','show')">
						<el-input class="lz-el-input" v-model="ruleForm.manageRange"
							:disabled="computeInputBox('manageRange','disabled')" :size="size" :maxlength="50"></el-input>
					</el-form-item>
					<el-form-item name="公司税码" :label="computeInputBox('companyTax','label')"
						:prop="computeInputBox('companyTax','isInput')" v-if="computeInputBox('companyTax','show')">
						<el-input class="lz-el-input" v-model="ruleForm.companyTax"
							:disabled="computeInputBox('companyTax','disabled')" :size="size" :maxlength="50"></el-input>
					</el-form-item>
					<el-form-item name="注册资金" :label="computeInputBox('registerMoney','label')"
						:prop="computeInputBox('registerMoney','isInput')"
						v-if="computeInputBox('registerMoney','show')">
						<el-input class="lz-el-input" v-model="ruleForm.registerMoney"
							:disabled="computeInputBox('registerMoney','disabled')" :size="size" :maxlength="20"></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="8">
					<el-form-item name="第一联系人" :label="computeInputBox('firstContactName','label')"
						:prop="computeInputBox('firstContactName','isInput')"
						v-if="computeInputBox('firstContactName','show')">
						<el-input class="lz-el-input" v-model="ruleForm.firstContactName"
							:disabled="computeInputBox('firstContactName','disabled')" :size="size" :maxlength="20"></el-input>
					</el-form-item>
					<el-form-item name="第一联系电话" :label="computeInputBox('firstPhone','label')"
						:prop="computeInputBox('firstPhone','isInput')" v-if="computeInputBox('firstPhone','show')">
						<el-input class="lz-el-input" v-model="ruleForm.firstPhone"
							:disabled="computeInputBox('firstPhone','disabled')" :size="size" :maxlength="20"></el-input>
					</el-form-item>
					<el-form-item name="邮箱Email" :label="computeInputBox('email','label')"
						:prop="computeInputBox('email','isInput')" v-if="computeInputBox('email','show')">
						<el-input class="lz-el-input" v-model="ruleForm.email"
							:disabled="computeInputBox('email','disabled')" :size="size" :maxlength="30"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="16">
					<el-form-item name="地址" :label="computeInputBox('address','label')"
						:prop="computeInputBox('address','isInput')" v-if="computeInputBox('address','show')">
						<el-input v-model="ruleForm.address" :disabled="computeInputBox('address','disabled')"
							:size="size" :maxlength="50"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-divider content-position="left">
				<el-link type="primary">财务资料</el-link>
			</el-divider>
			<el-row>
				<el-col :span="8">
					<el-form-item name="账号号码" label-width="140px" :label="computeInputBox('accountNo','label')"
						:prop="computeInputBox('accountNo','isInput')" v-if="computeInputBox('accountNo','show')">
						<el-input class="lz-el-input" v-model="ruleForm.accountNo"
							:disabled="computeInputBox('accountNo','disabled')" :size="size" :maxlength="30"></el-input>
					</el-form-item>
					<el-form-item name="开户行" label-width="140px" :label="computeInputBox('bankName','label')"
						:prop="computeInputBox('bankName','isInput')" v-if="computeInputBox('bankName','show')">
						<el-input class="lz-el-input" v-model="ruleForm.bankName"
							:disabled="computeInputBox('bankName','disabled')" :size="size" :maxlength="50"></el-input>
					</el-form-item>
					<el-form-item name="个人姓名" label-width="140px" :label="computeInputBox('personName','label')"
						:prop="computeInputBox('personName','isInput')" v-if="computeInputBox('personName','show')">
						<el-input class="lz-el-input" v-model="ruleForm.personName"
							:disabled="computeInputBox('personName','disabled')" :size="size" :maxlength="20"></el-input>
					</el-form-item>
					<el-form-item name="个人账号" label-width="140px" :label="computeInputBox('personAccountNo','label')"
						:prop="computeInputBox('personAccountNo','isInput')"
						v-if="computeInputBox('personAccountNo','show')">
						<el-input class="lz-el-input" v-model="ruleForm.personAccountNo"
							:disabled="computeInputBox('personAccountNo','disabled')" :size="size" :maxlength="50"></el-input>
					</el-form-item>
					<el-form-item name="个人开户行" label-width="140px" :label="computeInputBox('personBankName','label')"
						:prop="computeInputBox('personBankName','isInput')"
						v-if="computeInputBox('personBankName','show')">
						<el-input class="lz-el-input" v-model="ruleForm.personBankName"
							:disabled="computeInputBox('personBankName','disabled')" :size="size" :maxlength="50"></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="8">
					<el-form-item name="财务负责人" label-width="140px" :label="computeInputBox('financeMan','label')"
						:prop="computeInputBox('financeMan','isInput')" v-if="computeInputBox('financeMan','show')">
						<el-input class="lz-el-input" v-model="ruleForm.financeMan"
							:disabled="computeInputBox('financeMan','disabled')" :size="size" :maxlength="20"></el-input>
					</el-form-item>
					<el-form-item name="财务手机号码" label-width="140px" :label="computeInputBox('financePhone','label')"
						:prop="computeInputBox('financePhone','isInput')"
						v-if="computeInputBox('personBankName','show')">
						<el-input class="lz-el-input" v-model="ruleForm.financePhone"
							:disabled="computeInputBox('financePhone','disabled')" :size="size" :maxlength="20"></el-input>
					</el-form-item>
					<el-form-item name="财务电话" label-width="140px" :label="computeInputBox('financeTel','label')"
						:prop="computeInputBox('financeTel','isInput')" v-if="computeInputBox('financeTel','show')">
						<el-input class="lz-el-input" v-model="ruleForm.financeTel"
							:disabled="computeInputBox('financeTel','disabled')" :size="size" :maxlength="20"></el-input>
					</el-form-item>
					<el-form-item name="财务邮箱地址" label-width="140px" :label="computeInputBox('financeEmail','label')"
						:prop="computeInputBox('financeEmail','isInput')" v-if="computeInputBox('financeEmail','show')">
						<el-input class="lz-el-input" v-model="ruleForm.financeEmail"
							:disabled="computeInputBox('financeEmail','disabled')" :size="size" :maxlength="20"></el-input>
					</el-form-item>
					<el-form-item name="财务wechat" label-width="140px" :label="computeInputBox('financeWebqq','label')"
						:prop="computeInputBox('financeWebqq','isInput')" v-if="computeInputBox('financeWebqq','show')">
						<el-input class="lz-el-input" v-model="ruleForm.financeWebqq"
							:disabled="computeInputBox('financeWebqq','disabled')" :size="size" :maxlength="20"></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="8">
					<el-form-item name="发票公司" :label="computeInputBox('invoiceCompany','label')"
						:prop="computeInputBox('invoiceCompany','isInput')" v-if="computeInputBox('invoiceCompany','show')">
						<el-input class="lz-el-input" v-model="ruleForm.invoiceCompany"
							:disabled="computeInputBox('invoiceCompany','disabled')" :size="size" :maxlength="50"></el-input>
					</el-form-item>
					<el-form-item name="结算方式" :label="computeInputBox('settleType','label')"
						:prop="computeInputBox('settleType','isInput')" v-if="computeInputBox('settleType','show')">
						<el-select v-model="ruleForm.settleType" placeholder="请选择" :size="size" clearable
							class="lz-el-select" :disabled="computeInputBox('settleType','disabled')">
							<el-option v-for="item in settleTypeList" :key="item.id" :label="item.settleName"
								:value="item.settleNo"></el-option>
						</el-select>
					</el-form-item>
					<el-form-item name="付款方式" :label="computeInputBox('paymentType','label')"
						:prop="computeInputBox('paymentType','isInput')" v-if="computeInputBox('paymentType','show')">
						<el-select v-model="ruleForm.paymentType" placeholder="请选择" :size="size" clearable
							class="lz-el-select" :disabled="computeInputBox('paymentType','disabled')">
							<el-option v-for="item in paymentTypeList" :key="item.id" :label="item.payName"
								:value="item.payNo"></el-option>
						</el-select>
					</el-form-item>
					<el-form-item name="币别" :label="computeInputBox('coin','label')"
						:prop="computeInputBox('coin','isInput')" v-if="computeInputBox('coin','show')">
						<el-select v-model="ruleForm.coin" placeholder="请选择" :size="size" clearable class="lz-el-select"
							:disabled="computeInputBox('coin','disabled')">
							<el-option v-for="item in coinList" :key="item.id" :label="item.coinName"
								:value="item.coinNo"></el-option>
						</el-select>
					</el-form-item>
					<el-form-item name="税率编码" :label="computeInputBox('taxNo','label')"
						:prop="computeInputBox('taxNo','isInput')" v-if="computeInputBox('taxNo','show')">
						<el-select v-model="ruleForm.taxNo" placeholder="请选择" :size="size" clearable
							class="lz-el-select" :disabled="computeInputBox('taxNo','disabled')">
							<el-option v-for="item in taxNoList" :key="item.id" :label="item.taxName"
								:value="item.taxNo"></el-option>
						</el-select>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="16">
					<el-form-item name="其他" :label="computeInputBox('memos','label')"
						:prop="computeInputBox('memos','isInput')" v-if="computeInputBox('memos','show')">
						<el-input v-model="ruleForm.memos" :disabled="computeInputBox('memos','disabled')" :size="size" :maxlength="255">
						</el-input>
					</el-form-item>
					<el-form-item name="备注" :label="computeInputBox('note','label')"
						:prop="computeInputBox('note','isInput')" v-if="computeInputBox('note','show')">
						<el-input v-model="ruleForm.note" :disabled="computeInputBox('note','disabled')" :size="size" :maxlength="255">
						</el-input>
					</el-form-item>
				</el-col>
			</el-row>
		</el-form>
		<el-divider content-position="left">
			<el-link type="primary">相关资料上传</el-link>
		</el-divider>
		<div class="upload">
			<div class="title">营业执照：</div>
			<fileUpload ref="fileUpload1" @fileUploadData="fileUploadData($event,'营业执照')"></fileUpload>
		</div>
		<div class="upload">
			<div class="title">开票资料：</div>
			<fileUpload2 ref="fileUpload2" @fileUploadData="fileUploadData($event,'开票资料')"></fileUpload2>
		</div>
		<div class="upload">
			<div class="title">其他资料：</div>
			<fileUpload3 ref="fileUpload3" @fileUploadData="fileUploadData($event,'其他资料')"></fileUpload3>
		</div>

	</div>
</template>

<script>
	let that
	import {
		mapGetters
	} from 'vuex'
	import fileUpload from '@/components/fileUpload/fileUpload'
	import fileUpload2 from '@/components/fileUpload2/fileUpload'
	import fileUpload3 from '@/components/fileUpload3/fileUpload'
	import lzRowCol from '@/components/lzRowCol/lzRowCol'
	export default {
		components: {
			lzRowCol,
			fileUpload,
			fileUpload2,
			fileUpload3,
		},
		name: 'addCustomer',
		props: {
			type: {
				type: String,
				default: () => {
					return ''
				}
			},
		},
		computed: {
			...mapGetters(['size', 'themeBtColor', 'api', 'InputBoxList']),
			//计算出当前输入框配置信息
			computeInputBox() {
				return (field, type, prop) => {
					let arr = this.InputBoxList.find(item => item.fieldName == field)
					if (arr && type == 'show') {
						return arr.isVisible == 0 ? true : false //0为显示1为隐藏
					}
					if (arr && type == 'isInput') {
						if (arr.isInput != 0 && this.rules[field]) { //0为必填1为不必填
							this.rules[field][0].required = false
						}
						return field
					}
					if (arr && type == 'disabled') {
						return arr.isDisplay == 0 ? true : false //0为只读1为可读写
					}
					if (arr && type == 'label') {
						return arr.fieldLabel //标签动态显示名称
					}
					return false
				}
			}
		},
		data() {
			return {
				supplierNoList: [{
					id: 1,
					label: 'caca',
					name: '李钊'
				}], //供应商列表
				companykindList: [{ //公司性质
						value: '1',
						label: '一般纳税人'
					},
					{
						value: '2',
						label: '小规模纳税人'
					},
					{
						value: '3',
						label: '个体户'
					},
					{
						value: '4',
						label: '外币公司'
					},
					{
						value: '5',
						label: '三来一补'
					}
				],
				supplieTypeList: [], //供应商类型
				settleTypeList: [], //结算方式列表
				paymentTypeList: [], //付款方式列表
				coinList: [], //币别列表
				taxNoList: [], //税率编码列表
				ruleForm: {
					supplieType: '', //供应商类型
					supplierNo: '', //供应商编号
					supplierCname: '', //供应商简称
					supplierEname: '', //供应商全称
					manageRange: '', //经营范围
					address: '', //地址
					companyKind: '', //公司性质
					companyTax: '', //公司税码
					registerMoney: '', //注册资金
					firstContactName: '', //第一联系人
					firstPhone: '', //第一联系电话
					email: '', //邮箱Email
					//财务资料
					invoiceCompany: '', //发票公司
					accountNo: '', //账号号码
					bankName: '', //开户银行
					personName: '', //个人姓名
					personAccountNo: '', //个人账号
					personBankName: '', //个人账号开户行
					memos: '', //其他
					note: '', //备注
					settleType: '', //结算方式
					paymentType: '', //付款方式
					coin: '', //币别	
					taxNo: '', //税率编码
					financeMan: '', //财务负责人
					financePhone: '', //财务手机号
					financeEmail: '', //财务邮箱
					financeTel: '', //财务电话
					financeWebqq: '', //财务wechat
					//材料上传
					imgBusinessLicense: '', //营业执照
					imgInvoice: '', //开票材料
					imgOther: '', //其他材料
				},
				rules: {
					financeWebqq:[{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}],
					taxNo:[{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}],
					coin:[{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}],
					note:[{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}],
					memos:[{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}],
					bankName:[{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}],
					accountNo:[{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}],
					supplierEname:[{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}],
					supplieType:[{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}],
					financeMan: [{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}],
					financeTel: [{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}, {
						validator: this.$lizhao.test.checkLandlineAndMobile,
						trigger: 'change'
					}],
					financeEmail: [{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}],
					financePhone: [{
							required: true,
							message: '必填项',
							trigger: 'blur'
						},
						{
							validator: this.$lizhao.test.checkLandlineAndMobile,
							trigger: 'change'
						}
					],
					personName: [{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}],
					personAccountNo: [{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}],
					personBankName: [{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}],
					supplierNo: [{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}],
					supplierCname: [{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}],
					manageRange: [{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}],
					address: [{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}],
					companyKind: [{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}],
					companyTax: [{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}],
					taxcode: [{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}],
					registerMoney: [{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}],
					firstContactName: [{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}],
					firstPhone: [{
							required: true,
							message: '必填项',
							trigger: 'blur'
						},
						{
							validator: this.$lizhao.test.checkLandlineAndMobile,
							trigger: 'change'
						}
					],
					email: [{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}, {
						validator: this.$lizhao.test.checkEmail,
						trigger: 'change'
					}],
					supplierNo: [{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}],
					invoiceCompany: [{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}],
					shippingAddress: [{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}],
					quotationNoFormat: [{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}],
					quotationBeginNo: [{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}],
					saleNoFormat: [{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}],
					saleBusinessBeginNo: [{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}],
					littleBusinessBeginNo: [{
						required: true,
						message: '必填项',
						trigger: 'blur'
					}],
				}
			}
		},
		mounted() {
			that = this
			//获取结算方式字典
			that.settlement_list()
			//付款类型列表
			that.payment_list()
			//税率列表
			that.tax_list()
			//获取类型列表
			that.businessType_list()
			//获取币别
			that.coin_list()
		},
		methods: {
			//获取币别
			coin_list() {
				that.GLOBAL.doGet(that.api.GLOBAL_setting_coin_list, {}, function(res) {
					if (res.code == 200) {
						that.coinList = res.result
					}
				});
			},
			//获取类型列表0001为客户类型0002为供应商类型
			businessType_list() {
				that.GLOBAL.doGet(that.api.GLOBAL_setting_businessType_list, {
					businessType: '0001'
				}, function(res) {
					if (res.code == 200) {
						that.supplieTypeList = res.result
					}
				});
			},
			//税率列表
			tax_list() {
				that.GLOBAL.doGet(that.api.GLOBAL_setting_tax_list, {}, function(res) {
					if (res.code == 200) {
						that.taxNoList = res.result
					}
				});
			},
			//获取结算方式字典
			settlement_list() {
				that.GLOBAL.doGet(that.api.GLOBAL_setting_settlement_list, {}, function(res) {
					if (res.code == 200) {
						that.settleTypeList = res.result
					}
				});
			},
			//获取付款方式字典
			payment_list() {
				that.GLOBAL.doGet(that.api.GLOBAL_setting_payment_list, {}, function(res) {
					if (res.code == 200) {
						that.paymentTypeList = res.result
					}
				});
			},
			//点击查看
			SeeRuleForm(row, text) {
				that.ruleForm = JSON.parse(JSON.stringify(row))
				that.$refs.fileUpload1.seeImage(that.ruleForm.imgBusinessLicense, text) //营业执照
				that.$refs.fileUpload2.seeImage(that.ruleForm.imgInvoice, text) //开票资料
				that.$refs.fileUpload3.seeImage(that.ruleForm.imgOther, text) //其它资料
			},
			//点击添加弹框确定
			determine() {
				that.$refs.ruleForm.validate((valid) => {
					console.log(valid);
					if (valid) {
						let req = {
							...that.ruleForm
						}
						that.GLOBAL.doPost(that.api.GLOBAL_masterData_supplier_add, req, function(res) {
							if (res.code == 200) {
								that.$message.success(res.message)
								that.$emit('success', true)
							}
						});
					} else {
						console.log('error submit!!');
						return false;
					}
				})

			},
			//客户编辑
			customer_edit() {
				that.$refs.ruleForm.validate((valid) => {
					if (valid) {
						let req = {
							...that.ruleForm
						}
						that.GLOBAL.doPost(that.api.GLOBAL_masterData_supplier_edit, req, function(res) {
							if (res.code == 200) {
								that.$message.success(res.message)
								that.$emit('success', true)
							}
						});
					} else {
						console.log('error submit!!');
						return false;
					}
				})
			},
			//附件上传完成
			fileUploadData(data, text) {
				if (data.fileList.length > 0) {
					let req = {
						url: data.fileList[0].url,
						name: data.fileList[0].name,
						uid: data.fileList[0].uid,
						type: data.fileList[0].raw.type,
						size: data.fileList[0].raw.size,
					}
					if (text == '营业执照') {
						that.ruleForm.imgBusinessLicense = JSON.stringify(req)
					} else if (text == '开票资料') {
						that.ruleForm.imgInvoice = JSON.stringify(req)
					} else if (text == '其他资料') {
						that.ruleForm.imgOther = JSON.stringify(req)
					}
				} else {
					that.ruleForm.imgBusinessLicense = ''
					that.ruleForm.imgInvoice = ''
					that.ruleForm.imgOther = ''
				}
			},
			//重置
			Reset() {
				that.ruleForm={
					supplieType: '', //供应商类型
					supplierNo: '', //供应商编号
					supplierCname: '', //供应商简称
					supplierEname: '', //供应商全称
					manageRange: '', //经营范围
					address: '', //地址
					companyKind: '', //公司性质
					companyTax: '', //公司税码
					registerMoney: '', //注册资金
					firstContactName: '', //第一联系人
					firstPhone: '', //第一联系电话
					email: '', //邮箱Email
					//财务资料
					invoiceCompany: '', //发票公司
					accountNo: '', //账号号码
					bankName: '', //开户银行
					personName: '', //个人姓名
					personAccountNo: '', //个人账号
					personBankName: '', //个人账号开户行
					memos: '', //其他
					note: '', //备注
					settleType: '', //结算方式
					paymentType: '', //付款方式
					coin: '', //币别	
					taxNo: '', //税率编码
					financeMan: '', //财务负责人
					financePhone: '', //财务手机号
					financeEmail: '', //财务邮箱
					financeTel: '', //财务电话
					financeWebqq: '', //财务wechat
					//材料上传
					imgBusinessLicense: '', //营业执照
					imgInvoice: '', //开票材料
					imgOther: '', //其他材料
				}
				this.$refs.ruleForm.resetFields();
			}
		}

	}
</script>

<style lang="scss" scoped>
	.addCustomer {
		.upload {
			display: flex;
			width: 100%;
			margin-bottom: 20px;
			box-sizing: border-box;

			.title {
				font-size: 14px;
				padding: 0 5px;
				padding: 5px;
				width: 100px;
			}
		}
	}
</style>
